﻿using ST.Torch.WebApi.Core.Entities.System;
using System.Linq.Expressions;


namespace ST.Torch.WebApi.Application;

interface  ISYSRoleService
{
	#region curd
	void Insert(SYSRole entity);


	Task InsertAsync(SYSRole entity, string[] Includes = null);

	void Update(SYSRole entity, string[] Includes = null);

	Task UpdateAsync(SYSRole entity, string[] Includes = null);

	void Delete(SYSRole entity, bool IsSoft = false);

	Task DeleteAsync(SYSRole entity, bool IsSoft = false);
    bool Any(Expression<Func<SYSRole, bool>> predicate);


    Task<bool> AnyAsync(Expression<Func<SYSRole, bool>> predicate);

    SYSRole Single(Expression<Func<SYSRole, bool>> predicate, bool tracking = false);

	Task<SYSRole> SingleAsync(Expression<Func<SYSRole, bool>> predicate, bool IsIncludeMenus = false, bool IsIncludeUsers = false, bool tracking = false);

	List<SYSRole> Query(Expression<Func<SYSRole, bool>> predicate, bool tracking = false);

	Task<List<SYSRole>> QueryAsync(Expression<Func<SYSRole, bool>> predicate, bool IsIncludeMenus = false, bool tracking = false);


	PagedList<SYSRole> QueryPage(Expression<Func<SYSRole, bool>> predicate, PageReq page, bool tracking = false);

	Task<PagedList<SYSRole>> QueryPageAsync(Expression<Func<SYSRole, bool>> predicate, PageReq page, bool tracking = false);
	




	#endregion
}
